﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FIFP.DashBoard.Model
{
    public class PlanForSort : IComparable
    {
        public int id;

        public DateTime date;

        //flag = 1 means start date
        //flag = -1 means end date
        public int flag;

        public PlanForSort() { }

        public PlanForSort(int i, DateTime d, int f)
        {
            id = i;
            date = d;
            flag = f;
        }

        public int CompareTo(object obj)
        {
            PlanForSort plan = obj as PlanForSort;
            if (date.CompareTo(plan.date) == 0)
                return flag.CompareTo(plan.flag);
            else
                return date.CompareTo(plan.date);
        }
    }
}
